/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.equipment.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.equipment.entity.EleEquipmentType;
import com.thinkgem.jeesite.modules.sys.dao.UserDao;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.equipment.dao.EleEquipmentTypeDao;

/**
 * 设备类型管理Service
 * @author ZC
 * @version 2017-04-25
 */
@Service
@Transactional(readOnly = true)
public class EleEquipmentTypeService extends CrudService<EleEquipmentTypeDao, EleEquipmentType> {
	@Autowired
	private EleEquipmentTypeDao eleEquipmentTypeDao;
	public EleEquipmentType get(String id) {
		return super.get(id);
	}
	
	public List<EleEquipmentType> findList(EleEquipmentType eleEquipmentType) {
		return super.findList(eleEquipmentType);
	}
	
	public Page<EleEquipmentType> findPage(Page<EleEquipmentType> page, EleEquipmentType eleEquipmentType) {
		return super.findPage(page, eleEquipmentType);
	}
	
	@Transactional(readOnly = false)
	public void save(EleEquipmentType eleEquipmentType) {
		super.save(eleEquipmentType);
	}
	
	@Transactional(readOnly = false)
	public void delete(EleEquipmentType eleEquipmentType) {
		super.delete(eleEquipmentType);
	}
	public long findEqipmentsForTheType(String typeId){
		return eleEquipmentTypeDao.findEqipmentsForTheType(typeId);
	}
	@Transactional(readOnly = false)
	public void batchUpdateEleEquipmentTypeStatus(String users,String status,String checker){
		eleEquipmentTypeDao.batchUpdateEleEquipmentTypeStatus(users, status, checker);
	}
	
}